//package HiveUDF;
//
//import com.alibaba.fastjson.JSONObject;
//import com.aliyun.odps.data.Struct;
//import org.apache.hadoop.hive.ql.exec.UDF;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * @program: EXAMPLE_Hive
// * @description:
// * @author: CliffordChen
// * @create: 2021-03-25 17:26
// */
//@com.aliyun.odps.udf.annotation.Resolve("array<struct<pid:string,tm:bigint,tp:int>>->array<string>")
//public class clock2str extends UDF {
//    public List<String> evaluate(List<Struct> structList) {
//        List<String> result = new ArrayList<>();
//        for (Struct struct : structList) {
//            String pid = String.valueOf(struct.getFieldValue("pid"));
//            Long tm = Long.valueOf(String.valueOf(struct.getFieldValue("tm")));
//            Integer tp = Integer.valueOf(String.valueOf(struct.getFieldValue("tp")));
//            JSONObject jsonObject = new JSONObject();
//            jsonObject.put("pid",pid);
//            jsonObject.put("tm",tm);
//            jsonObject.put("tp",tp);
//            result.add(jsonObject.toJSONString());
//        }
//        return result;
//    }
//}